package com.roubsite.admin.dao.user;

import com.roubsite.database.bean.Record;
import com.roubsite.database.dao.DataSet;

import java.util.LinkedList;
import java.util.List;
import java.util.Map;

public interface IUserDao {
	public DataSet queryd(Record record, int start, int rows);

	public Map getUserInfo(String username);

	public LinkedList<String> getUserAuthorizedUrl(String userId);

	public DataSet getUserInfoById(String userId);

	public int saveData(Record record, Class<?> bean);

	public int del(List ids) throws Exception;

	public String[] getUserRoles(String userId);

	public int editUserRole(String userId, String[] roleId);

	public DataSet queryUserOrgan(Record record, int start, int rows);

	public int editUserOrgan(String UserId, String organId);

	public int upStatusByName(String username, String userStatus);

	public Map getUserSystem();

	public int updateNum(String username, String uSER_STATUS, String lOCK_TIME, String eXPIRED_TIME,
			String dENIED_VISITS, String lAST_DENIED_TIME);

	public void insertLog(String ip, String userName, String describe, String page, String uri, String ua);

	/**
	 * 注册用户
	 * 
	 * @apiNote 该方法需通过UserUtils调用
	 * @param userId
	 * @param username
	 * @param password
	 * @param roleId
	 * @param organId
	 */
	public void register(String userId, String username, String password, String roleId, String organId);

	/**
	 * 用户是否存在
	 *
	 * @param userName
	 * @return
	 */
	public boolean isInSystem(String userName);

	/**
	 * 修改用户密码
	 * 
	 * @apiNote 该方法需通过UserUtils调用
	 * @param encode
	 * @param uid
	 * @return
	 */
	public int updatePassword(String encode, String uid);
}
